<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>简约个人博客</title>
    <style>
        /* 基础样式重置 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: #333;
            background-color: #f8f9fa;
        }

        a {
            text-decoration: none;
            color: inherit;
        }

        ul {
            list-style: none;
        }

        img {
            max-width: 100%;
            height: auto;
        }

        .container {
            width: 90%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 15px;
        }

        .section {
            padding: 60px 0;
        }

        .section-title {
            text-align: center;
            margin-bottom: 40px;
            font-size: 2rem;
            color: #2c3e50;
            position: relative;
        }

        .section-title::after {
            content: '';
            display: block;
            width: 60px;
            height: 3px;
            background: #3498db;
            margin: 10px auto;
        }

        /* 导航栏样式 */
        .navbar {
            background-color: #fff;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
        }

        .navbar-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 0;
        }

        .logo {
            font-size: 1.8rem;
            font-weight: 700;
            color: #3498db;
        }

        .nav-links {
            display: flex;
            gap: 30px;
        }

        .nav-links li a {
            font-weight: 500;
            transition: color 0.3s;
        }

        .nav-links li a:hover {
            color: #3498db;
        }

        .menu-toggle {
            display: none;
            flex-direction: column;
            cursor: pointer;
        }

        .menu-toggle span {
            width: 25px;
            height: 3px;
            background: #333;
            margin: 3px 0;
            transition: 0.3s;
        }

        /* 轮播图区域 */
        .hero {
            margin-top: 70px;
            height: 80vh;
            background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://picsum.photos/1600/900?random=1') center/cover no-repeat;
            display: flex;
            align-items: center;
            color: #fff;
            text-align: center;
        }

        .hero-content {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
        }

        .hero h1 {
            font-size: 3rem;
            margin-bottom: 20px;
            animation: fadeInUp 1s ease;
        }

        .hero p {
            font-size: 1.2rem;
            margin-bottom: 30px;
            animation: fadeInUp 1s ease 0.2s both;
        }

        .btn {
            display: inline-block;
            padding: 12px 30px;
            background: #3498db;
            color: #fff;
            border-radius: 30px;
            font-weight: 600;
            transition: all 0.3s;
            border: none;
            cursor: pointer;
            animation: fadeInUp 1s ease 0.4s both;
        }

        .btn:hover {
            background: #2980b9;
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        /* 文章介绍区域 */
        .articles {
            background-color: #fff;
        }

        .articles-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
        }

        .article-card {
            background: #fff;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            transition: transform 0.3s, box-shadow 0.3s;
        }

        .article-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        }

        .article-img {
            height: 200px;
            overflow: hidden;
        }

        .article-img img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s;
        }

        .article-card:hover .article-img img {
            transform: scale(1.1);
        }

        .article-content {
            padding: 20px;
        }

        .article-content h3 {
            margin-bottom: 10px;
            color: #2c3e50;
        }

        .article-meta {
            display: flex;
            justify-content: space-between;
            color: #7f8c8d;
            font-size: 0.9rem;
            margin-bottom: 15px;
        }

        .article-excerpt {
            margin-bottom: 20px;
            color: #555;
        }

        .read-more {
            color: #3498db;
            font-weight: 600;
            transition: color 0.3s;
        }

        .read-more:hover {
            color: #2980b9;
        }

        /* 个人信息区域 */
        .about {
            background: linear-gradient(to right, #3498db, #2c3e50);
            color: #fff;
        }

        .about .section-title {
            color: #fff;
        }

        .about .section-title::after {
            background: #fff;
        }

        .about-content {
            display: flex;
            align-items: center;
            gap: 50px;
        }

        .profile-img {
            flex: 1;
            text-align: center;
        }

        .profile-img img {
            width: 300px;
            height: 300px;
            border-radius: 50%;
            object-fit: cover;
            border: 5px solid rgba(255, 255, 255, 0.2);
        }

        .profile-info {
            flex: 2;
        }

        .profile-info h2 {
            font-size: 2rem;
            margin-bottom: 20px;
        }

        .profile-info p {
            margin-bottom: 20px;
            font-size: 1.1rem;
            line-height: 1.8;
        }

        .social-links {
            display: flex;
            gap: 15px;
            margin-top: 30px;
        }

        .social-links a {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            transition: all 0.3s;
        }

        .social-links a:hover {
            background: #fff;
            color: #3498db;
            transform: translateY(-5px);
        }

        /* 页脚 */
        footer {
            background: #2c3e50;
            color: #ecf0f1;
            text-align: center;
            padding: 30px 0;
        }

        /* 轮播图样式 */
        .carousel {
            position: relative;
            width: 100%;
            height: 100%;
        }

        .carousel-inner {
            position: relative;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

        .carousel-item {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            transition: opacity 1s ease-in-out;
        }

        .carousel-item.active {
            opacity: 1;
        }

        .carousel-control {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0, 0, 0, 0.5);
            color: white;
            border: none;
            font-size: 1.5rem;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            cursor: pointer;
            z-index: 10;
            transition: background 0.3s;
        }

        .carousel-control:hover {
            background: rgba(0, 0, 0, 0.8);
        }

        .carousel-control.prev {
            left: 20px;
        }

        .carousel-control.next {
            right: 20px;
        }

        .carousel-indicators {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 10px;
        }

        .indicator {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.5);
            cursor: pointer;
            transition: background 0.3s;
        }

        .indicator.active {
            background: white;
        }

        /* 动画 */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* 响应式设计 */
        @media (max-width: 992px) {
            .about-content {
                flex-direction: column;
                text-align: center;
            }
            
            .profile-info {
                padding: 0 20px;
            }
        }

        @media (max-width: 768px) {
            .menu-toggle {
                display: flex;
            }
            
            .nav-links {
                position: fixed;
                top: 70px;
                left: -100%;
                flex-direction: column;
                background: #fff;
                width: 100%;
                text-align: center;
                transition: 0.3s;
                box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
                padding: 20px 0;
            }
            
            .nav-links.active {
                left: 0;
            }
            
            .hero h1 {
                font-size: 2.2rem;
            }
            
            .section {
                padding: 40px 0;
            }
        }

        @media (max-width: 576px) {
            .hero h1 {
                font-size: 1.8rem;
            }
            
            .hero p {
                font-size: 1rem;
            }
            
            .section-title {
                font-size: 1.5rem;
            }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar">
        <div class="container navbar-container">
            <a href="#" class="logo">MyBlog</a>
            <ul class="nav-links">
                <li><a href="#">首页</a></li>
                <li><a href="#">文章</a></li>
                <li><a href="#">关于</a></li>
                <li><a href="#">联系</a></li>
            </ul>
            <div class="menu-toggle">
                <span></span>
                <span></span>
                <span></span>
            </div>
        </div>
    </nav>

    <!-- 轮播图区域 -->
    <section class="hero">
        <div class="carousel">
            <div class="carousel-inner">
                <div class="carousel-item active">
                    <div class="hero-content">
                        <h1>欢迎来到我的个人博客</h1>
                        <p>在这里分享我的技术见解、生活感悟和创作灵感</p>
                        <a href="#" class="btn">了解更多</a>
                    </div>
                </div>
                <div class="carousel-item">
                    <div class="hero-content">
                        <h1>探索技术的无限可能</h1>
                        <p>记录前端开发的点点滴滴，与你共同成长</p>
                        <a href="#" class="btn">查看文章</a>
                    </div>
                </div>
                <div class="carousel-item">
                    <div class="hero-content">
                        <h1>简约而不简单</h1>
                        <p>用最简洁的设计传达最深刻的思想</p>
                        <a href="#" class="btn">开始阅读</a>
                    </div>
                </div>
            </div>
            <button class="carousel-control prev">&#10094;</button>
            <button class="carousel-control next">&#10095;</button>
            <div class="carousel-indicators">
                <span class="indicator active" data-slide="0"></span>
                <span class="indicator" data-slide="1"></span>
                <span class="indicator" data-slide="2"></span>
            </div>
        </div>
    </section>

    <!-- 文章介绍区域 -->
    <section class="section articles">
        <div class="container">
            <h2 class="section-title">最新文章</h2>
            <div class="articles-grid">
                <div class="article-card">
                    <div class="article-img">
                        <img src="https://picsum.photos/600/400?random=2" alt="文章图片">
                    </div>
                    <div class="article-content">
                        <h3>响应式设计的未来趋势</h3>
                        <div class="article-meta">
                            <span>2023-06-15</span>
                            <span>前端开发</span>
                        </div>
                        <p class="article-excerpt">随着移动设备的普及，响应式设计已成为现代Web开发的核心要素。本文探讨了最新的设计趋势和技术实践。</p>
                        <a href="#" class="read-more">阅读全文 →</a>
                    </div>
                </div>
                <div class="article-card">
                    <div class="article-img">
                        <img src="https://picsum.photos/600/400?random=3" alt="文章图片">
                    </div>
                    <div class="article-content">
                        <h3>JavaScript异步编程详解</h3>
                        <div class="article-meta">
                            <span>2023-06-10</span>
                            <span>编程技术</span>
                        </div>
                        <p class="article-excerpt">深入理解JavaScript中的异步编程模型，包括Promise、async/await等现代语法的使用技巧。</p>
                        <a href="#" class="read-more">阅读全文 →</a>
                    </div>
                </div>
                <div class="article-card">
                    <div class="article-img">
                        <img src="https://picsum.photos/600/400?random=4" alt="文章图片">
                    </div>
                    <div class="article-content">
                        <h3>简约设计的美学原理</h3>
                        <div class="article-meta">
                            <span>2023-06-05</span>
                            <span>设计思考</span>
                        </div>
                        <p class="article-excerpt">探讨简约设计背后的心理学原理和美学价值，以及如何在实际项目中应用这些原则。</p>
                        <a href="#" class="read-more">阅读全文 →</a>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 个人信息区域 -->
    <section class="section about">
        <div class="container">
            <h2 class="section-title">关于我</h2>
            <div class="about-content">
                <div class="profile-img">
                    <img src="https://picsum.photos/400/400?random=5" alt="个人头像">
                </div>
                <div class="profile-info">
                    <h2>张明轩</h2>
                    <p>我是一名前端开发工程师，专注于创建美观、实用且用户友好的Web应用。拥有5年以上的开发经验，擅长HTML、CSS、JavaScript等前端技术。</p>
                    <p>在业余时间，我喜欢阅读技术博客、参与开源项目，并热衷于分享我的知识和经验。我相信持续学习是技术进步的关键。</p>
                    <div class="social-links">
                        <a href="#"><span>微博</span></a>
                        <a href="#"><span>GitHub</span></a>
                        <a href="#"><span>LinkedIn</span></a>
                        <a href="#"><span>邮箱</span></a>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 页脚 -->
    <footer>
        <div class="container">
            <p>&copy; 2023 我的个人博客. 保留所有权利.</p>
        </div>
    </footer>

    <script>
        // 移动端菜单切换
        const menuToggle = document.querySelector('.menu-toggle');
        const navLinks = document.querySelector('.nav-links');

        menuToggle.addEventListener('click', () => {
            navLinks.classList.toggle('active');
        });

        // 轮播图功能
        class Carousel {
            constructor(element) {
                this.carousel = element;
                this.items = Array.from(this.carousel.querySelectorAll('.carousel-item'));
                this.indicators = Array.from(this.carousel.querySelectorAll('.indicator'));
                this.prevBtn = this.carousel.querySelector('.carousel-control.prev');
                this.nextBtn = this.carousel.querySelector('.carousel-control.next');
                this.currentIndex = 0;
                
                this.init();
            }
            
            init() {
                // 绑定事件
                this.prevBtn.addEventListener('click', () => this.prev());
                this.nextBtn.addEventListener('click', () => this.next());
                
                // 绑定指示器点击事件
                this.indicators.forEach((indicator, index) => {
                    indicator.addEventListener('click', () => this.goTo(index));
                });
                
                // 自动播放
                this.autoPlay();
            }
            
            showSlide(index) {
                // 隐藏所有幻灯片
                this.items.forEach(item => item.classList.remove('active'));
                this.indicators.forEach(indicator => indicator.classList.remove('active'));
                
                // 显示当前幻灯片
                this.items[index].classList.add('active');
                this.indicators[index].classList.add('active');
                
                this.currentIndex = index;
            }
            
            next() {
                let nextIndex = this.currentIndex + 1;
                if (nextIndex >= this.items.length) {
                    nextIndex = 0;
                }
                this.showSlide(nextIndex);
            }
            
            prev() {
                let prevIndex = this.currentIndex - 1;
                if (prevIndex < 0) {
                    prevIndex = this.items.length - 1;
                }
                this.showSlide(prevIndex);
            }
            
            goTo(index) {
                this.showSlide(index);
            }
            
            autoPlay() {
                setInterval(() => {
                    this.next();
                }, 5000);
            }
        }
        
        // 初始化轮播图
        document.addEventListener('DOMContentLoaded', () => {
            const carouselElement = document.querySelector('.carousel');
            new Carousel(carouselElement);
        });

        // 平滑滚动效果
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function(e) {
                e.preventDefault();
                const target = document.querySelector(this.getAttribute('href'));
                if (target) {
                    window.scrollTo({
                        top: target.offsetTop - 70,
                        behavior: 'smooth'
                    });
                }
            });
        });
    </script>
</body>
</html>